<html>
    <!--描述网页信息-->
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>小黄</title>
 		<style>
            *{
                font-size: 50px;
            }
        
            .btn{height:80px; width:80%; padding: 0px 30px; background-color: #0071E7; border: solid 1px #0071E7; border-radius:5px; font-size: 1em; color: white}
 		</style>
        
        <script>
            function clear() {
                document.getElementById('mobile').innerHTML = ''
                document.getElementById('name').innerHTML = ''
                document.getElementById('msg').innerHTML = ''
            }
        
            //OC调用JS的方法列表
        	function alertMobile() {
                //这里已经调用过来了 但是搞不明白为什么alert方法没有响应
        		//alert('我是上面的小黄 手机号是:13300001111')
                document.getElementById('mobile').innerHTML = 'pyc ' + application_name
        	}

        	function alertName(msg) {
        		//alert('你好 ' + msg + ', 我也很高兴见到你')
                document.getElementById('name').innerHTML = '你好 ' + msg + ', 我也很高兴见到你'
        	}

        	function alertSendMsg(num,msg) {
        		//window.alert('这是我的手机号:' + num + ',' + msg + '!!')
                document.getElementById('msg').innerHTML = '这是我的手机号:' + num + ',' + msg + '!!'
            }
        
            //JS调用iOS原生API
            function btnClick1() {
                window.webkit.messageHandlers.showMobile.postMessage(null)
            }

            function btnClick2() {
                window.webkit.messageHandlers.showName.postMessage('xiao黄')
            }

            function btnClick3() {
                window.webkit.messageHandlers.showSendMsg.postMessage(['13300001111', 'Go Climbing This Weekend !!!'])
            }

        </script>
        
        
    </head>

    <!--网页具体内容-->
    <body>
        <br/>

		<div>
			<label>小黄：13300001111</label>
		</div>
		<br/>

        <div id="mobile"></div>
		<div>
			<button class="btn" type="button" onclick="btnClick1()">小红的手机号</button>
		</div>
		<br/>
        
        <div id="name"></div>
		<div>
			<button class="btn" type="button" onclick="btnClick2()">打电话给小红</button>
		</div>
		<br/>
        
        <div id="msg"></div>
		<div>
			<button class="btn" type="button" onclick="btnClick3()">发短信给小红</button>
		</div>


    </body>
</html>
